package com.zh.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface AccountDao {
    @Update("update users set password = password + #{password} where username = #{user2} ")
    void inMoney(@Param("user1") String user1,@Param("user2") String user2,@Param("password") String password);
    @Update("update users set password = password - #{password} where username = #{user1}")
    void outMoney(@Param("user1") String user1,@Param("user2") String user2,@Param("password") String password);
}
